<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>vue</title>
        <!-- 引入vue文件-->
		<script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
	</head>
	<body>
		<div id="vue">
			<!--绑定单击事件-->
			<input type="button" v-model="message1" @mouseout="show()" />
			<input type="button" v-model="message2" @mousemove="add()" />
			<ul>
				<li v-for="value in arr">
					{{value}}
				</li>
			</ul>
		</div>
	</body>
	<script type="application/javascript">
		new Vue({
			el:'#vue',
			data:{
				message1:'BUTTON',
				message2:'ADD',
				arr:['哈哈','呵呵','嘿嘿','哼哼'], /*数组*/
			},
			methods:{
				show:function(){
					alert(123456);
				},
				add:function(){
					this.arr.push('呼呼');/*this表示vue对象*/
				}
			}
		})
		
		
	</script>
</html>
